
#ifndef __DE_JPEG_H__
#define __DE_JPEG_H__

#include <stdint.h>  
#include <stdio.h>
#include <stdlib.h>

#include "debug.h"

#include <jpeglib.h>
#include <jerror.h>


#define PNG_FILE 	0X03
#define JPEG_FILE 	0X02
#define BMP_FILE 	0X01 


struct jpeg_file{
	char filename[1024];
	FILE* fp;			//文件符
	struct jpeg_decompress_struct cinfo;
	struct jpeg_error_mgr jerr;

	int width;			//图像宽度
	int height;			//图像高度
	int size;			//图像大小
	int row_size;		//每行占用的字节大小
	int Bpp;			//Bytes per pixel
	uint8_t *buffer;	//解压后的图像buffer
};




#endif





